readAtAsync

suspend fun readAtAsync(position: Long, length: Int): ByteArray(source)

Asynchronously read bytes from any position.

Use this for loading tensor data that may be beyond the preloaded buffer. If the requested range is within the preloaded buffer, returns from cache.

Return

ByteArray of the requested data

Parameters

position

Starting byte offset (0-indexed)

length

Number of bytes to read